package io.github.eric.urpc.core.conn;

import io.github.eric.urpc.core.rpc.msg.ApplicationInfoReq;
import io.github.eric.urpc.core.rpc.msg.ApplicationInfoRes;

import java.util.Collection;
import java.util.function.Predicate;

public interface ConnectionManager {
	void add(Connection conn);
	void remove(Connection conn);
	void shutdown();
	Collection<Connection> getConnections();
	Collection<Connection> getConnections(Predicate<Connection> predicate);
	void watchConnection();
	void updateConnectionInitStatus(String connId, boolean succeed);
	ApplicationInfoRes updateConnectionInitStatus(String connId, ApplicationInfoReq applicationInfoReq);
}
